package com.supreme.uploadserver.service;

import java.io.IOException;
import java.nio.file.Path;

public interface FileProcService {

    /**
     * storeUploadFile
     * @param storePath store file path
     * @param originalFilename origin file name
     * @param fileCallback MultipartFile.transferTo(File file);
     * @return new file Path
     * @throws IOException
     */
    Path storeUploadFile(String storePath, String originalFilename, IFileCallback fileCallback) throws IOException;

    /**
     * writeUploadFile
     * @param multipartFileBytes write file bytes
     * @param storePath store file path
     * @param originalFilename origin file name
     * @return new file name
     * @throws IOException
     */
    String writeUploadFile(byte[] multipartFileBytes, String storePath, String originalFilename) throws IOException;
}
